<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>首页</title>
		<meta name="keywords" content="Bootstrap模版,Bootstrap模版下载,Bootstrap教程,Bootstrap中文" />
		<meta name="description" content="站长素材提供Bootstrap模版,Bootstrap教程,Bootstrap中文翻译等相关Bootstrap插件下载" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!-- basic styles -->

		<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="assets/css/font-awesome.min.css" />
        <link rel="stylesheet"  href="assets/css/kkpager_orange.css" />
        <link rel="stylesheet"  href="assets/css/jquery.datetimepicker.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<!-- ace styles -->

		<link rel="stylesheet" href="assets/css/ace.min.css" />
		<link rel="stylesheet" href="assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="assets/css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->
<#--
		<script src="assets/js/ace-extra.min.js"></script>

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries &ndash;&gt;

		<!--[if lt IE 9]>
		<script src="assets/js/html5shiv.js"></script>
		<script src="assets/js/respond.min.js"></script>-->
		<![endif]-->
	</head>

	<body>
		<#include "header.ftl"/>
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>
                <#include "left_list_menu.ftl">
                <div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								首页
							</li>

							<li>
								消息列表
							</li>
						</ul><!-- .breadcrumb -->

					</div>

					<div class="page-content">
						<div class="page-header">
							<#--<h1>-->
								<#--客户信息列表-->
								<#--<small>-->
									<#--<i class="icon-double-angle-right"></i>-->
									<#--Static &amp; Dynamic Tables-->
								<#--</small>-->
							<#--</h1>-->
                                <#--<input type="text" name="customer_name_key" id="customer_name_key" placeholder="请输入客户名称" value="${customerInfo.customer_name !''}"/>-->
                                <#--<input type="text" name="customer_id_key" id="customer_id_key" placeholder="请输入客户编号" value="${customerInfo.customer_id !''}"/>-->
                                <#--<button id="search_customer" type="button" class="btn btn-sm btn-primary">-->
                                    <#--<i class="icon-search"></i>-->
                                    <#--搜索-->
                                <#--</button>-->
                                    <#--<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addCouponInfo" >添加优惠券活动</button>-->
						</div><!-- /.page-header -->

						<div class="row">
                            <div class="col-xs-12 col-sm-12">
                                <div class="panel panel-default" style="margin-bottom:10px;">
                                    <div class="panel-heading">
                                        <h4 class="panel-title">消息通知
                                            <#--<button type="button" data-toggle="modal" data-target="#pushMessage" id="addNewInfo" class="btn btn-primary btn-xs" style="float:right;margin-top:-6px;margin-left:10px">推送消息</button>-->
                                            <#--<button type="button" data-toggle="modal" id="addNewService" class="btn btn-primary btn-xs" style="float:right;margin-top:-6px;">推送服务</button>-->
                                        </h4>
                                    </div>
                                    <div class="panel-body" id="information" style="padding: 0px;">
                                        <div id="informationList">
                                            <#list suggests as list>
                                                <div style="border-top:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;padding:10px 30px 25px 30px;margin: 0px;">
                                                    <h5>
                                                        <span style="float: left;">${list.createtime?number?number_to_date !""}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <strong>${list.customer_name !""}</strong> <span style="margin-left: 20px;">${list.customer_phone !""}</span>
															<#if list.is_do == 1>
                                                                <span style="float: right;margin: 15px 0;">
																	<button class="btn btn-primary btn-xs" onclick="startOrderDetail(${list.suggest_id?c},${list.order_id?c})">去处理</button>
																</span>
																<#else >
																<span style="float: right;margin: 15px 0;">
																	<button class="btn btn-primary btn-xs" disabled="disabled">已处理</button>
																</span>
															</#if>
                                                    </h5>
                                                    <p>${list.suggest_content !""}</p>
                                                </div>
                                            </#list>
										</div>
                                        <div style="display: inline-block;float:right;">
                                            <ul id='bp-3-element-sm-test' style="display: inline-block;float:right;margin:10px 5px;padding-right:0px"></ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->

			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!-- basic scripts -->


		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
        <script type="text/javascript" src="assets/js/jquery-1.10.2.min.js"></script>
		<script src="assets/js/bootstrap.min.js"></script>
		<script src="assets/js/typeahead-bs2.min.js"></script>

		<!-- page specific plugin scripts -->

		<script src="assets/js/jquery.dataTables.min.js"></script>
		<script src="assets/js/jquery.dataTables.bootstrap.js"></script>

		<!-- ace scripts -->

		<script src="assets/js/ace-elements.min.js"></script>
		<script src="assets/js/ace.min.js"></script>

        <script type="text/javascript" src="assets/js/kkpager.min.js"></script>
        <script src="assets/js/myJs.js"></script>
        <script src="assets/js/jquery.datetimepicker.js"></script>


		<!-- inline scripts related to this page -->
        <script type="text/javascript">
            try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
        </script>
        <script type="text/javascript">
            window.jQuery || document.write("<script src='assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
        </script>
        <script src="assets/js/ace-extra.min.js"></script>

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="assets/js/bootstrap.min.js"></script>
            <script src="assets/js/typeahead-bs2.min.js"></script>
            <!-- page specific plugin scripts -->
        <script src="assets/js/html5shiv.js"></script>

        <script src="assets/js/respond.min.js"></script>

        <!-- ace scripts -->

        <script src="assets/js/jquery.cookie.js"></script>

        <script type="text/javascript">
			window.onload=function(){
                var name = $.cookie('username');
            if (name == '' || name == null || typeof(name)=="undefined"){
                document.getElementById("user_name").innerText="unknown user";
                alert("请先登录");
                window.location.href='login';
            }

            document.getElementById("user_name").innerText=name;
            }

            <#--$(function(){-->
                <#--//生成分页-->
                <#--//有些参数是可选的，比如lang，若不传有默认值-->
                <#--kkpager.generPageHtml({-->
                    <#--pno : '${pageInfo.page_index}',-->
                    <#--//总页码-->
                    <#--total : '${pageInfo.page_count}',-->
                    <#--//总数据条数-->
                    <#--totalRecords : '${pageInfo.count_info}',-->
                    <#--mode : 'click',//默认值是link，可选link或者click-->
                    <#--click : function(n){-->
                        <#--// do something-->
                        <#--window.location.href = '${pageInfo.page_href}'+ n;-->
                        <#--//手动选中按钮-->
                        <#--this.selectPage(n);-->
                        <#--return false;-->
                    <#--}-->
                <#--});-->
            <#--});-->

//            $("#search_customer").click(function(){
//                var customer_name = $("input[name='customer_name_key']").val();
//                var customer_id = $("input[name='customer_id_key']").val();
//                window.location.href = 'selectCustomerList?customer_name='+customer_name+'&customer_id='+customer_id+"&page=1";
//            });
//
//            //添加优惠券
//			$("#addCoupon").click(function(){
//				var coupon_name = $("input[name='coupon_name_key']").val();
//				var coupon_price = $("input[name='coupon_price_key']").val();
//				var coupon_count = $("input[name='coupon_count_key']").val();
//				var coupon_useful = Date.parse($("input[name='coupon_useful_key']").val());
//				var coupon_useful_string = coupon_useful / 1000 + "000";
//				alert(coupon_useful_string);
//				if(coupon_name == ""){
//					alert("请输入优惠券活动名称");
//					return false;
//				}
//				if(coupon_price == ""){
//					alert("请输入金额");
//					return false;
//				}
//				if(coupon_count == ""){
//					alert("请输入总数");
//					return false;
//				}
//                if(coupon_useful == ""){
//                    alert("请输入有效期");
//                    return false;
//                }
//				//return false;
//				$.ajax({
//					type:"POST",
//					url:"insertCoupon?",
//					data:{"coupon_name":coupon_name,"price":coupon_price,"count_number":coupon_count,"useful_time":coupon_useful_string},
//					dataType:'json',
//					beforeSend: function () {
//		//                        initial_deal();
//					},
//					success:function(data){
//		//                        closeWaitDialog();
//						if(data.status == 200){
//							alert("添加成功！");
//							window.location.reload();
//						}else{
//							alert(data.info);
//							return false;
//						}
//					},
//					error: function () {
//		//                        closeWaitDialog();
//						alert("服务端出错！");
//						return false;
//					}
//				});
//			});
//
//
//            $("#saveEditMaintainForm").click(function(){
//
//                var admin_id = $("#project_id").val();
//                var admin_name = $("#project_content").val();
//                var admin_phone = $("#project_price").val();
//                var admin_login_name = $("#project_back").val();
//                $.ajax({
//                    type:"POST",
//                    url:"updateMaintain?",
//                    data:{"service_id":admin_id,"service_content":admin_name,"service_all_price":admin_phone,"service_back":admin_login_name},
//                    dataType:'json',
//                    beforeSend: function () {
////                        initial_deal();
//                    },
//                    success:function(data){
////                        closeWaitDialog();
//                        if(data.status == 200){
//                            alert("修改成功！");
//                            window.location.reload();
//                        }else{
//                            alert(data.info);
//                            return false;
//                        }
//                    },
//                    error: function () {
////                        closeWaitDialog();
//                        alert("服务端出错！");
//                        return false;
//                    }
//                });
//            });
//
//            //日期
//            $("#coupon_useful_key").datetimepicker({
//                format:'Y-m-d 23:59:59',
//                timepicker:true,
//                lang: 'zh',
//            });

			jQuery(function($) {
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			})
		</script>
<#--<script type="text/javascript">-->
<#--var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");-->
<#--document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fe9e1d61340ff3d9495a8cca04ebdb49d' type='text/javascript'%3E%3C/script%3E"));-->
<#--</script>-->
<#--<a href="http://www.iteblog.com">过往记忆</a>-->
</body>
</html>
